<template>
	<view class="footer-box">
		<view class="footer flex-around">
			<view class="flex-center item" @click="goPage('/index/index',0)">
				<image src="/static/tab1-a.png" mode="widthFix" v-if="tabIndex == 0"></image>
				<image src="/static/tab1.png" mode="widthFix" v-else></image>
				
			</view>
			<view class="flex-center item" @click="goPage('/create/index',1)">
				<image src="/static/tab2-a.png" mode="widthFix" v-if="tabIndex == 1"></image>
				<image src="/static/tab2.png" mode="widthFix" v-else></image>
				
			</view>
			<view class="flex-center item" @click="goPage('/user/user',2)">
				<image src="/static/tab3-a.png" mode="widthFix" v-if="tabIndex == 2"></image>
				<image src="/static/tab3.png" mode="widthFix" v-else></image>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['tabIndex'],
		data() {
			return {
				
			};
		},
		methods:{
			goPage(url,index){
				uni.reLaunch({
					url:'/pages'+url
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.footer-box{
		height: 98rpx;
		.footer{
			position: fixed;
			bottom:0;
			left:0;
			height: 98rpx;
			width: 100vw;
			background:#202634 ;
			z-index: 2;
			.item{
				width: 20%;
				image{
					width: 48rpx;
					height: 48rpx;
				}
			}
		}
	}
</style>
